3.391 \(\int (c+d x) \sec ^2(a+b x) \sin (3 a+3 b x) \, dx\)

Optimal. Leaf size=57 \[ \frac {4 d \sin (a+b x)}{b^2}+\frac {d \tanh ^{-1}(\sin (a+b x))}{b^2}-\frac {4 (c+d x) \cos (a+b x)}{b}-\frac {(c+d x) \sec (a+b x)}{b} \]

[Out]

d*arctanh(sin(b*x+a))/b^2-4*(d*x+c)*cos(b*x+a)/b-(d*x+c)*sec(b*x+a)/b+4*d*sin(b*x+a)/b^2

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {4431, 3296, 2637, 4407, 4409, 3770} \[ \frac {4 d \sin (a+b x)}{b^2}+\frac {d \tanh ^{-1}(\sin (a+b x))}{b^2}-\frac {4 (c+d x) \cos (a+b x)}{b}-\frac {(c+d x) \sec (a+b x)}{b} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)*Sec[a + b*x]^2*Sin[3*a + 3*b*x],x]

[Out]

(d*ArcTanh[Sin[a + b*x]])/b^2 - (4*(c + d*x)*Cos[a + b*x])/b - ((c + d*x)*Sec[a + b*x])/b + (4*d*Sin[a + b*x])
/b^2

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3296

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> -Simp[((c + d*x)^m*Cos[e + f*x])/f, x] +
Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4407

Int[((c_.) + (d_.)*(x_))^(m_.)*Sin[(a_.) + (b_.)*(x_)]^(n_.)*Tan[(a_.) + (b_.)*(x_)]^(p_.), x_Symbol] :> -Int[
(c + d*x)^m*Sin[a + b*x]^n*Tan[a + b*x]^(p - 2), x] + Int[(c + d*x)^m*Sin[a + b*x]^(n - 2)*Tan[a + b*x]^p, x]
/; FreeQ[{a, b, c, d, m}, x] && IGtQ[n, 0] && IGtQ[p, 0]

Rule 4409

Int[((c_.) + (d_.)*(x_))^(m_.)*Sec[(a_.) + (b_.)*(x_)]^(n_.)*Tan[(a_.) + (b_.)*(x_)]^(p_.), x_Symbol] :> Simp[
((c + d*x)^m*Sec[a + b*x]^n)/(b*n), x] - Dist[(d*m)/(b*n), Int[(c + d*x)^(m - 1)*Sec[a + b*x]^n, x], x] /; Fre
eQ[{a, b, c, d, n}, x] && EqQ[p, 1] && GtQ[m, 0]

Rule 4431

Int[((e_.) + (f_.)*(x_))^(m_.)*(F_)[(a_.) + (b_.)*(x_)]^(p_.)*(G_)[(c_.) + (d_.)*(x_)]^(q_.), x_Symbol] :> Int
[ExpandTrigExpand[(e + f*x)^m*G[c + d*x]^q, F, c + d*x, p, b/d, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && M
emberQ[{Sin, Cos}, F] && MemberQ[{Sec, Csc}, G] && IGtQ[p, 0] && IGtQ[q, 0] && EqQ[b*c - a*d, 0] && IGtQ[b/d,
1]

Rubi steps

\begin {align*} \int (c+d x) \sec ^2(a+b x) \sin (3 a+3 b x) \, dx &=\int \left (3 (c+d x) \sin (a+b x)-(c+d x) \sin (a+b x) \tan ^2(a+b x)\right ) \, dx\\ &=3 \int (c+d x) \sin (a+b x) \, dx-\int (c+d x) \sin (a+b x) \tan ^2(a+b x) \, dx\\ &=-\frac {3 (c+d x) \cos (a+b x)}{b}+\frac {(3 d) \int \cos (a+b x) \, dx}{b}+\int (c+d x) \sin (a+b x) \, dx-\int (c+d x) \sec (a+b x) \tan (a+b x) \, dx\\ &=-\frac {4 (c+d x) \cos (a+b x)}{b}-\frac {(c+d x) \sec (a+b x)}{b}+\frac {3 d \sin (a+b x)}{b^2}+\frac {d \int \cos (a+b x) \, dx}{b}+\frac {d \int \sec (a+b x) \, dx}{b}\\ &=\frac {d \tanh ^{-1}(\sin (a+b x))}{b^2}-\frac {4 (c+d x) \cos (a+b x)}{b}-\frac {(c+d x) \sec (a+b x)}{b}+\frac {4 d \sin (a+b x)}{b^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.48, size = 105, normalized size = 1.84 \[ -\frac {\sec (a+b x) \left (2 b (c+d x) \cos (2 (a+b x))-2 d \sin (2 (a+b x))+d \cos (a+b x) \left (\log \left (\cos \left (\frac {1}{2} (a+b x)\right )-\sin \left (\frac {1}{2} (a+b x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (a+b x)\right )+\cos \left (\frac {1}{2} (a+b x)\right )\right )\right )+3 b c+3 b d x\right )}{b^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)*Sec[a + b*x]^2*Sin[3*a + 3*b*x],x]

[Out]

-((Sec[a + b*x]*(3*b*c + 3*b*d*x + 2*b*(c + d*x)*Cos[2*(a + b*x)] + d*Cos[a + b*x]*(Log[Cos[(a + b*x)/2] - Sin
[(a + b*x)/2]] - Log[Cos[(a + b*x)/2] + Sin[(a + b*x)/2]]) - 2*d*Sin[2*(a + b*x)]))/b^2)

________________________________________________________________________________________

fricas [A]  time = 0.44, size = 93, normalized size = 1.63 \[ -\frac {2 \, b d x + 8 \, {\left (b d x + b c\right )} \cos \left (b x + a\right )^{2} - d \cos \left (b x + a\right ) \log \left (\sin \left (b x + a\right ) + 1\right ) + d \cos \left (b x + a\right ) \log \left (-\sin \left (b x + a\right ) + 1\right ) - 8 \, d \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 2 \, b c}{2 \, b^{2} \cos \left (b x + a\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*sec(b*x+a)^2*sin(3*b*x+3*a),x, algorithm="fricas")

[Out]

-1/2*(2*b*d*x + 8*(b*d*x + b*c)*cos(b*x + a)^2 - d*cos(b*x + a)*log(sin(b*x + a) + 1) + d*cos(b*x + a)*log(-si
n(b*x + a) + 1) - 8*d*cos(b*x + a)*sin(b*x + a) + 2*b*c)/(b^2*cos(b*x + a))

________________________________________________________________________________________

giac [B]  time = 1.79, size = 2876, normalized size = 50.46 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*sec(b*x+a)^2*sin(3*b*x+3*a),x, algorithm="giac")

[Out]

-1/2*(10*b*d*x*tan(1/2*b*x)^4*tan(1/2*a)^4 + 10*b*c*tan(1/2*b*x)^4*tan(1/2*a)^4 + d*log(2*(tan(1/2*b*x)^4*tan(
1/2*a)^2 + 2*tan(1/2*b*x)^4*tan(1/2*a) + 2*tan(1/2*b*x)^3*tan(1/2*a)^2 + tan(1/2*b*x)^4 + 2*tan(1/2*b*x)^2*tan
(1/2*a)^2 - 2*tan(1/2*b*x)^3 + 2*tan(1/2*b*x)*tan(1/2*a)^2 + 2*tan(1/2*b*x)^2 + tan(1/2*a)^2 - 2*tan(1/2*b*x)
- 2*tan(1/2*a) + 1)/(tan(1/2*a)^2 + 1))*tan(1/2*b*x)^4*tan(1/2*a)^4 - d*log(2*(tan(1/2*b*x)^4*tan(1/2*a)^2 - 2
*tan(1/2*b*x)^4*tan(1/2*a) - 2*tan(1/2*b*x)^3*tan(1/2*a)^2 + tan(1/2*b*x)^4 + 2*tan(1/2*b*x)^2*tan(1/2*a)^2 +
2*tan(1/2*b*x)^3 - 2*tan(1/2*b*x)*tan(1/2*a)^2 + 2*tan(1/2*b*x)^2 + tan(1/2*a)^2 + 2*tan(1/2*b*x) + 2*tan(1/2*
a) + 1)/(tan(1/2*a)^2 + 1))*tan(1/2*b*x)^4*tan(1/2*a)^4 - 12*b*d*x*tan(1/2*b*x)^4*tan(1/2*a)^2 - 64*b*d*x*tan(
1/2*b*x)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x)*tan(1/2*a) + b^2)

________________________________________________________________________________________

maple [A]  time = 0.04, size = 87, normalized size = 1.53 \[ -\frac {4 c \cos \left (b x +a \right )}{b}-\frac {c}{b \cos \left (b x +a \right )}-\frac {4 d \cos \left (b x +a \right ) x}{b}+\frac {4 d \sin \left (b x +a \right )}{b^{2}}-\frac {d x}{b \cos \left (b x +a \right )}+\frac {d \ln \left (\sec \left (b x +a \right )+\tan \left (b x +a \right )\right )}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*sec(b*x+a)^2*sin(3*b*x+3*a),x)

[Out]

-4/b*c*cos(b*x+a)-1/b*c/cos(b*x+a)-4/b*d*cos(b*x+a)*x+4*d*sin(b*x+a)/b^2-1/b*d/cos(b*x+a)*x+1/b^2*d*ln(sec(b*x
+a)+tan(b*x+a))

________________________________________________________________________________________

maxima [B]  time = 1.12, size = 3330, normalized size = 58.42 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*sec(b*x+a)^2*sin(3*b*x+3*a),x, algorithm="maxima")

[Out]

-2*((cos(3*b*x + 3*a) + cos(b*x + a))*cos(4*b*x + 4*a) + (3*cos(2*b*x + 2*a) + 1)*cos(3*b*x + 3*a) + 3*cos(2*b
*x + 2*a)*cos(b*x + a) + (sin(3*b*x + 3*a) + sin(b*x + a))*sin(4*b*x + 4*a) + 3*sin(3*b*x + 3*a)*sin(2*b*x + 2
*a) + 3*sin(2*b*x + 2*a)*sin(b*x + a) + cos(b*x + a))*c/(b*cos(3*b*x + 3*a)^2 + 2*b*cos(3*b*x + 3*a)*cos(b*x +
 a) + b*cos(b*x + a)^2 + b*sin(3*b*x + 3*a)^2 + 2*b*sin(3*b*x + 3*a)*sin(b*x + a) + b*sin(b*x + a)^2) - 1/2*(4
*(cos(a)^2 + sin(a)^2)*b*x*cos(b*x + a) + 12*(b*x*cos(2*b*x + 3*a)*cos(b*x + 2*a) + b*x*cos(b*x + 2*a)*cos(a)
+ b*x*sin(2*b*x + 3*a)*sin(b*x + 2*a) + b*x*sin(b*x + 2*a)*sin(a))*cos(3*b*x + 3*a)^2 + 4*(b*x*cos(b*x + a) -
sin(b*x + a))*cos(2*b*x + 3*a)^2 + 12*(b*x*cos(2*b*x + 3*a)*cos(b*x + 2*a) + b*x*cos(b*x + 2*a)*cos(a) + b*x*s
in(2*b*x + 3*a)*sin(b*x + 2*a) + b*x*sin(b*x + 2*a)*sin(a))*sin(3*b*x + 3*a)^2 + 4*(b*x*cos(b*x + a) - sin(b*x
 + a))*sin(2*b*x + 3*a)^2 + 4*((b*x*cos(2*b*x + 3*a) + b*x*cos(a) + sin(2*b*x + 3*a) + sin(a))*cos(3*b*x + 3*a
)^2 + (b*x*cos(a) + sin(a))*cos(b*x + a)^2 + (b*x*cos(2*b*x + 3*a) + b*x*cos(a) + sin(2*b*x + 3*a) + sin(a))*s
in(3*b*x + 3*a)^2 + (b*x*cos(a) + sin(a))*sin(b*x + a)^2 + 2*(b*x*cos(2*b*x + 3*a)*cos(b*x + a) + (b*x*cos(a)
+ sin(a))*cos(b*x + a) + cos(b*x + a)*sin(2*b*x + 3*a))*cos(3*b*x + 3*a) + (b*x*cos(b*x + a)^2 + b*x*sin(b*x +
 a)^2)*cos(2*b*x + 3*a) + 2*(b*x*cos(2*b*x + 3*a)*sin(b*x + a) + (b*x*cos(a) + sin(a))*sin(b*x + a) + sin(2*b*
x + 3*a)*sin(b*x + a))*sin(3*b*x + 3*a) + (cos(b*x + a)^2 + sin(b*x + a)^2)*sin(2*b*x + 3*a))*cos(3*b*x + 4*a)
 + 4*(6*b*x*cos(b*x + 2*a)*cos(b*x + a)*cos(a) + 6*b*x*cos(b*x + a)*sin(b*x + 2*a)*sin(a) + b*x*cos(2*b*x + 3*
a)^2 + b*x*sin(2*b*x + 3*a)^2 + (cos(a)^2 + sin(a)^2)*b*x + 2*(3*b*x*cos(b*x + 2*a)*cos(b*x + a) + b*x*cos(a))
*cos(2*b*x + 3*a) + 2*(3*b*x*cos(b*x + a)*sin(b*x + 2*a) + b*x*sin(a))*sin(2*b*x + 3*a))*cos(3*b*x + 3*a) + 4*
(2*b*x*cos(b*x + a)*cos(a) + 3*(b*x*cos(b*x + a)^2 + b*x*sin(b*x + a)^2)*cos(b*x + 2*a) - 2*cos(a)*sin(b*x + a
))*cos(2*b*x + 3*a) + 12*(b*x*cos(b*x + a)^2*cos(a) + b*x*cos(a)*sin(b*x + a)^2)*cos(b*x + 2*a) - ((cos(2*b*x
+ 3*a)^2 + 2*cos(2*b*x + 3*a)*cos(a) + cos(a)^2 + sin(2*b*x + 3*a)^2 + 2*sin(2*b*x + 3*a)*sin(a) + sin(a)^2)*c
os(3*b*x + 3*a)^2 + (cos(b*x + a)^2 + sin(b*x + a)^2)*cos(2*b*x + 3*a)^2 + (cos(a)^2 + sin(a)^2)*cos(b*x + a)^
2 + (cos(2*b*x + 3*a)^2 + 2*cos(2*b*x + 3*a)*cos(a) + cos(a)^2 + sin(2*b*x + 3*a)^2 + 2*sin(2*b*x + 3*a)*sin(a
) + sin(a)^2)*sin(3*b*x + 3*a)^2 + (cos(b*x + a)^2 + sin(b*x + a)^2)*sin(2*b*x + 3*a)^2 + (cos(a)^2 + sin(a)^2
)*sin(b*x + a)^2 + 2*(cos(2*b*x + 3*a)^2*cos(b*x + a) + 2*cos(2*b*x + 3*a)*cos(b*x + a)*cos(a) + cos(b*x + a)*
sin(2*b*x + 3*a)^2 + 2*cos(b*x + a)*sin(2*b*x + 3*a)*sin(a) + (cos(a)^2 + sin(a)^2)*cos(b*x + a))*cos(3*b*x +
3*a) + 2*(cos(b*x + a)^2*cos(a) + cos(a)*sin(b*x + a)^2)*cos(2*b*x + 3*a) + 2*(cos(2*b*x + 3*a)^2*sin(b*x + a)
 + 2*cos(2*b*x + 3*a)*cos(a)*sin(b*x + a) + sin(2*b*x + 3*a)^2*sin(b*x + a) + 2*sin(2*b*x + 3*a)*sin(b*x + a)*
sin(a) + (cos(a)^2 + sin(a)^2)*sin(b*x + a))*sin(3*b*x + 3*a) + 2*(cos(b*x + a)^2*sin(a) + sin(b*x + a)^2*sin(
a))*sin(2*b*x + 3*a))*log(cos(b*x + a)^2 + sin(b*x + a)^2 + 2*sin(b*x + a) + 1) + ((cos(2*b*x + 3*a)^2 + 2*cos
(2*b*x + 3*a)*cos(a) + cos(a)^2 + sin(2*b*x + 3*a)^2 + 2*sin(2*b*x + 3*a)*sin(a) + sin(a)^2)*cos(3*b*x + 3*a)^
2 + (cos(b*x + a)^2 + sin(b*x + a)^2)*cos(2*b*x + 3*a)^2 + (cos(a)^2 + sin(a)^2)*cos(b*x + a)^2 + (cos(2*b*x +
 3*a)^2 + 2*cos(2*b*x + 3*a)*cos(a) + cos(a)^2 + sin(2*b*x + 3*a)^2 + 2*sin(2*b*x + 3*a)*sin(a) + sin(a)^2)*si
n(3*b*x + 3*a)^2 + (cos(b*x + a)^2 + sin(b*x + a)^2)*sin(2*b*x + 3*a)^2 + (cos(a)^2 + sin(a)^2)*sin(b*x + a)^2
 + 2*(cos(2*b*x + 3*a)^2*cos(b*x + a) + 2*cos(2*b*x + 3*a)*cos(b*x + a)*cos(a) + cos(b*x + a)*sin(2*b*x + 3*a)
^2 + 2*cos(b*x + a)*sin(2*b*x + 3*a)*sin(a) + (cos(a)^2 + sin(a)^2)*cos(b*x + a))*cos(3*b*x + 3*a) + 2*(cos(b*
x + a)^2*cos(a) + cos(a)*sin(b*x + a)^2)*cos(2*b*x + 3*a) + 2*(cos(2*b*x + 3*a)^2*sin(b*x + a) + 2*cos(2*b*x +
 3*a)*cos(a)*sin(b*x + a) + sin(2*b*x + 3*a)^2*sin(b*x + a) + 2*sin(2*b*x + 3*a)*sin(b*x + a)*sin(a) + (cos(a)
^2 + sin(a)^2)*sin(b*x + a))*sin(3*b*x + 3*a) + 2*(cos(b*x + a)^2*sin(a) + sin(b*x + a)^2*sin(a))*sin(2*b*x +
3*a))*log(cos(b*x + a)^2 + sin(b*x + a)^2 - 2*sin(b*x + a) + 1) + 4*((b*x*sin(2*b*x + 3*a) + b*x*sin(a) - cos(
2*b*x + 3*a) - cos(a))*cos(3*b*x + 3*a)^2 + (b*x*sin(a) - cos(a))*cos(b*x + a)^2 + (b*x*sin(2*b*x + 3*a) + b*x
*sin(a) - cos(2*b*x + 3*a) - cos(a))*sin(3*b*x + 3*a)^2 + (b*x*sin(a) - cos(a))*sin(b*x + a)^2 + 2*(b*x*cos(b*
x + a)*sin(2*b*x + 3*a) + (b*x*sin(a) - cos(a))*cos(b*x + a) - cos(2*b*x + 3*a)*cos(b*x + a))*cos(3*b*x + 3*a)
 - (cos(b*x + a)^2 + sin(b*x + a)^2)*cos(2*b*x + 3*a) + 2*(b*x*sin(2*b*x + 3*a)*sin(b*x + a) + (b*x*sin(a) - c
os(a))*sin(b*x + a) - cos(2*b*x + 3*a)*sin(b*x + a))*sin(3*b*x + 3*a) + (b*x*cos(b*x + a)^2 + b*x*sin(b*x + a)
^2)*sin(2*b*x + 3*a))*sin(3*b*x + 4*a) + 4*(6*b*x*cos(b*x + 2*a)*cos(a)*sin(b*x + a) + 6*b*x*sin(b*x + 2*a)*si
n(b*x + a)*sin(a) + 2*(3*b*x*cos(b*x + 2*a)*sin(b*x + a) - cos(a))*cos(2*b*x + 3*a) - cos(2*b*x + 3*a)^2 - cos
(a)^2 + 2*(3*b*x*sin(b*x + 2*a)*sin(b*x + a) - sin(a))*sin(2*b*x + 3*a) - sin(2*b*x + 3*a)^2 - sin(a)^2)*sin(3
*b*x + 3*a) + 4*(2*b*x*cos(b*x + a)*sin(a) + 3*(b*x*cos(b*x + a)^2 + b*x*sin(b*x + a)^2)*sin(b*x + 2*a) - 2*si
n(b*x + a)*sin(a))*sin(2*b*x + 3*a) + 12*(b*x*cos(b*x + a)^2*sin(a) + b*x*sin(b*x + a)^2*sin(a))*sin(b*x + 2*a
) - 4*(cos(a)^2 + sin(a)^2)*sin(b*x + a))*d/((cos(a)^2 + sin(a)^2)*b^2*cos(b*x + a)^2 + (cos(a)^2 + sin(a)^2)*
b^2*sin(b*x + a)^2 + (b^2*cos(2*b*x + 3*a)^2 + 2*b^2*cos(2*b*x + 3*a)*cos(a) + b^2*sin(2*b*x + 3*a)^2 + 2*b^2*
sin(2*b*x + 3*a)*sin(a) + (cos(a)^2 + sin(a)^2)*b^2)*cos(3*b*x + 3*a)^2 + (b^2*cos(b*x + a)^2 + b^2*sin(b*x +
a)^2)*cos(2*b*x + 3*a)^2 + (b^2*cos(2*b*x + 3*a)^2 + 2*b^2*cos(2*b*x + 3*a)*cos(a) + b^2*sin(2*b*x + 3*a)^2 +
2*b^2*sin(2*b*x + 3*a)*sin(a) + (cos(a)^2 + sin(a)^2)*b^2)*sin(3*b*x + 3*a)^2 + (b^2*cos(b*x + a)^2 + b^2*sin(
b*x + a)^2)*sin(2*b*x + 3*a)^2 + 2*(b^2*cos(2*b*x + 3*a)^2*cos(b*x + a) + 2*b^2*cos(2*b*x + 3*a)*cos(b*x + a)*
cos(a) + b^2*cos(b*x + a)*sin(2*b*x + 3*a)^2 + 2*b^2*cos(b*x + a)*sin(2*b*x + 3*a)*sin(a) + (cos(a)^2 + sin(a)
^2)*b^2*cos(b*x + a))*cos(3*b*x + 3*a) + 2*(b^2*cos(b*x + a)^2*cos(a) + b^2*cos(a)*sin(b*x + a)^2)*cos(2*b*x +
 3*a) + 2*(b^2*cos(2*b*x + 3*a)^2*sin(b*x + a) + 2*b^2*cos(2*b*x + 3*a)*cos(a)*sin(b*x + a) + b^2*sin(2*b*x +
3*a)^2*sin(b*x + a) + 2*b^2*sin(2*b*x + 3*a)*sin(b*x + a)*sin(a) + (cos(a)^2 + sin(a)^2)*b^2*sin(b*x + a))*sin
(3*b*x + 3*a) + 2*(b^2*cos(b*x + a)^2*sin(a) + b^2*sin(b*x + a)^2*sin(a))*sin(2*b*x + 3*a))

________________________________________________________________________________________

mupad [B]  time = 1.31, size = 150, normalized size = 2.63 \[ {\mathrm {e}}^{-a\,1{}\mathrm {i}-b\,x\,1{}\mathrm {i}}\,\left (\frac {-2\,b\,c+d\,2{}\mathrm {i}}{b^2}-\frac {2\,d\,x}{b}\right )-{\mathrm {e}}^{a\,1{}\mathrm {i}+b\,x\,1{}\mathrm {i}}\,\left (\frac {2\,b\,c+d\,2{}\mathrm {i}}{b^2}+\frac {2\,d\,x}{b}\right )-\frac {d\,\ln \left ({\mathrm {e}}^{a\,1{}\mathrm {i}+b\,x\,1{}\mathrm {i}}-\mathrm {i}\right )}{b^2}+\frac {d\,\ln \left ({\mathrm {e}}^{a\,1{}\mathrm {i}+b\,x\,1{}\mathrm {i}}+1{}\mathrm {i}\right )}{b^2}-\frac {{\mathrm {e}}^{a\,1{}\mathrm {i}+b\,x\,1{}\mathrm {i}}\,\left (c+d\,x\right )\,2{}\mathrm {i}}{b\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}\,1{}\mathrm {i}+1{}\mathrm {i}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((sin(3*a + 3*b*x)*(c + d*x))/cos(a + b*x)^2,x)

[Out]

exp(- a*1i - b*x*1i)*((d*2i - 2*b*c)/b^2 - (2*d*x)/b) - exp(a*1i + b*x*1i)*((d*2i + 2*b*c)/b^2 + (2*d*x)/b) -
(d*log(exp(a*1i + b*x*1i) - 1i))/b^2 + (d*log(exp(a*1i + b*x*1i) + 1i))/b^2 - (exp(a*1i + b*x*1i)*(c + d*x)*2i
)/(b*(exp(a*2i + b*x*2i)*1i + 1i))

________________________________________________________________________________________

sympy [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: HeuristicGCDFailed} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*sec(b*x+a)**2*sin(3*b*x+3*a),x)

[Out]

Exception raised: HeuristicGCDFailed

________________________________________________________________________________________